package com.nineclock.message.controller;

import com.nineclock.common.entity.Result;
import com.nineclock.message.service.PushRecordService;

import com.nineclock.system.pojo.NcMessage;
import com.nineclock.system.pojo.NcMessageDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/message")
public class PushRecordController  {

    @Autowired
    private PushRecordService pushRecordService;


    @GetMapping
    public Result message(NcMessageDTO dto) {
        List<NcMessage> message = pushRecordService.message(dto);

        return Result.success(message);
    }
}
